package com.kakarote.hrm.service;

import com.kakarote.core.feign.oa.entity.ExamineVO;
import com.kakarote.core.servlet.BaseService;
import com.kakarote.hrm.entity.PO.HrmEmployee;
import com.kakarote.hrm.entity.PO.HrmEmployeeQuitInfo;
import com.kakarote.core.feign.hrm.entity.HrmExamine;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * hrm业务流程图
 */
public interface IHrmExamineService extends BaseService<HrmExamine> {
    /**
     * 保存入职流程
     */
    Boolean saveHrmEntryExamine(HrmEmployee employee);
    /**
     * 员工信息修改流程
     */
    Boolean saveHrmEmployeeInfoChangeExamine(HrmEmployee employee, String formJson);
    /**
     * 员工关键字段修改流程
     */
    Boolean saveEmployeeKeyFieldChangeExamine(HrmEmployee employee, String formJson);

    /**
     * 员工职位层级调整审批
     */
    Boolean saveEmployeePostLevelChangeExamine(HrmEmployee employee, String formJson);
    /**
     * 保存离职流程
     */
    Boolean saveHrmLeaveExamine(HrmEmployee hrmEmployee, HrmEmployeeQuitInfo quitInfo);
    /**
     * 根据IDS查询流程Map
     */
    Map<Long, ExamineVO> getHrmExamineByIds(List<Long> hrmExamineIds);
    /**
     * 查询审批数据信息
     */
    ExamineVO queryHrmExamineInfo(String examineId);
    /**
     * 入职流程终止
     */
    void finishEntryExamine(Long hrmExamineId,Integer examineStatus);
    /**
     * 集团入职流程终止
     */
    void finishGroupEntryExamine(Long hrmExamineId,Integer examineStatus);
    /**
     * 离职流程终止
     */
    void finishLeaveExamine(Long hrmExamineId,Integer examineStatus);
    /**
     * 人员调动终止
     */
    void finishEmployeeChange(Long hrmExamineId,Integer examineStatus);
    /**
     * 内部流程完成
     */
    void finishChildrenFlow(Long hrmExamineId,Integer examineStatus);
    /**
     * 父节点的最后一个流程为引用流程，子节点完成之后，父节点得相应的完成
     * @param hrmExamineId
     * @param examineStatus
     */
     void  finishParentFlow(Long hrmExamineId,Integer examineStatus);
    /**
     * 跨单位保存调动流程
     */
    Boolean saveHrmEmployeeChangeExamine(HrmEmployee employee);
    /**
     * 内部单位保存调动流程
     */
    Boolean saveHrmEmployeeChangeExamineInner(HrmEmployee employee);
    /**
     * 保存调动流程-调入流程
     */
    Boolean saveHrmEmployeeChangeInExamine(Long flowId,Long recordId);
    /**
     * 保存调动流程-调出流程
     */
    Boolean saveHrmEmployeeChangeOutExamine(Long flowId,Long recordId);
    /**
     * 企业员工入职流程-集团审批部分
     */
    Boolean saveEmpEntryGroupExamine(Long flowId,Long recordId);
    /**
     * 员工信息修改审核
     */
    void finishEmployeeInfoChangeExamine(Long hrmExamineId, Integer examineStatus);

    /**
     * 员工关键字段修改审核
     * @param hrmExamineId
     * @param examineStatus
     */
    void finishEmployeeKeyFieldChangeExamine(Long hrmExamineId, Integer examineStatus);

    /**
     * 员工职位层级调整审批
     * @param hrmExamineId
     * @param examineStatus
     */
    void finishEmployeePostLevelChangeExamine(Long hrmExamineId, Integer examineStatus);
}
